/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2024. All rights reserved.
 *
 */

import { Module, Project } from '@ohos/hvigor';

import { PluginFactory } from './src/plugin/factory/plugin-factory.js';

/**
 * Stage模型的hap插件
 *
 * @param module hvigorModule
 */
export const hapTasks = (module: Module) => {
  return PluginFactory.getHapPlugin(module);
};


/**
 * Fa模型的hap插件
 *
 * @param module hvigorModule
 */
export const legacyHapTasks = (module: Module) => {
  return PluginFactory.getHapPlugin(module, true);
};

/**
 * Stage模型的app插件
 *
 * @param module hvigorProject
 */
export const appTasks = (module: Project) => {
  return PluginFactory.getAppPlugin(module);
};


/**
 * Fa模型的app插件
 *
 * @param module hvigorProject
 */
export const legacyAppTasks = (module: Project) => {
  return PluginFactory.getAppPlugin(module, true);
};

/**
 * Stage模型的Har插件
 *
 * @param module hvigorModule
 */
export const harTasks = (module: Module) => {
  return PluginFactory.getHarPlugin(module);
};

/**
 * Fa模型的Har插件
 *
 * @param module hvigorModule
 */
export const legacyHarTasks = (module: Module) => {
  return PluginFactory.getHarPlugin(module, true);
};

/**
 * Stage模型的hsp插件，注意没有Fa模型的hsp插件
 *
 * @param module hvigorModule
 */
export const hspTasks = (module: Module) => {
  return PluginFactory.getHspPlugin(module);
};

/**
 * 对外支持remote_hsp在线签名接口，非需求要求不要轻易修改
 */
export { getRemoteHspObjList } from './src/utils/remote-hsp-utils';

export {
  HvigorCompilePlugin, CompileHookInterface, HvigorCompilePluginContext, ModuleInfo, ShouldInvalidCacheOptions,
  AcornNode, NullValue
} from '@ohos/hvigor-arkts-compose';

export {
  OhosAppContext,
  OhosHapContext,
  OhosHarContext,
  OhosHspContext,
  Product,
  Target,
  OhosPluginId,
  OhpmDependencyInfo,
  BuildOption,
  AppOhosConfig,
  HapOhosConfig,
  HspOhosConfig,
  HarOhosConfig,
  DefaultPluginId
} from './src/external/api/ohos-plugin-api.js';
